/*
 * log.h
 *
 *  Created on: Apr 22, 2009
 *      Author: kuncai
 */

#ifndef LOG_H_
#define LOG_H_
#include <string>
using namespace std;
#include <string.h>
#include <stdio.h>
#include "stdarg.h"
#include "time.h"
class Log 
{
	public:
		Log();
		~Log();
	public:
		static void Debug(const char* format,...);
		static void Info(const char* format,...);
		static void Config(int debug=0, int info=0, int debugtofile=0, int infotofile=0,  string filename="log.txt");
	private:
		//0:don't output string;
		//1:output string ;
		static int DEBUG;
		static int INFO;
		//1:output to file;
		//0:output to std;
		static int DEBUGTOFILE;
		static int INFOTOFILE;
		static string sFilenameDebug;
		static string sFilenameInfo;
		static FILE* fDEBUGfd;
		static FILE* fINFOfd;
};

#endif /* LOG_H_ */
